package com.smartens.boit.activity.viewmodel;

import android.app.Application;

import androidx.annotation.NonNull;
import androidx.lifecycle.AndroidViewModel;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelStoreOwner;

public class MainActivityViewMode extends AndroidViewModel {
   final MutableLiveData<Boolean> isnewMessage=new MutableLiveData<>();

    public MutableLiveData<Boolean> getIsnewMessage() {
        return isnewMessage;
    }

    public MainActivityViewMode(@NonNull Application application) {
        super(application);
        isnewMessage.setValue(false);
    }
    public  static  MainActivityViewMode getViewMode(ViewModelStoreOwner owner,Application application)
    {
        return  new ViewModelProvider(owner, ViewModelProvider.AndroidViewModelFactory.getInstance(application)).get(MainActivityViewMode.class);
    }

}
